//HEADER FILES

//XLCD.h

#include "p18f452.h"
#include "p18cxxx.h"


//Prototypes
void XLCD_Setup(void);                            //to initialise the LCD
void XLCD_SetupXXX(void);                         //unused
void XLCDCommand(unsigned char cmd);              //to send commands to LCD           
void WriteLCD(char *aaa, char *bbb);		      //send two strings to LCD for display
												  //aaa first line bbb secound line	
							

/* Display Commands*/


#define XLCDL1home()    	     		XLCDCommand(0x80)		/*cursor at start of line1*/
#define XLCDL2home()   					XLCDCommand(0xC0)		/*cursor at start of line2*/
#define XLCDClear()     	     		XLCDCommand(0x01) 		/*clears the display*/

#define XLCDCursorOnBlinkOn()        	XLCDCommand(0x0F)		/*cursor bliner on*/
#define XLCDCursorOnBlinkOff()       	XLCDCommand(0x0E)		/*cursor bliner off*/
#define XLCDDisplayOnCursorOff()     	XLCDCommand(0x0C)		/*no cursor*/
#define XLCDDisplayOff()             	XLCDCommand(0x08)		/* display off*/

/* commands recomend not using*/
#define XLCDReturnHome() 	     		XLCDCommand(0x02)
#define XLCDCursorMoveLeft()         	XLCDCommand(0x10)
#define XLCDCursorMoveRight()        	XLCDCommand(0x14)
#define XLCDDisplayMoveLeft()        	XLCDCommand(0x18)
#define XLCDDisplayMoveRight()       	XLCDCommand(0x1C)
#define XLCD2linemode()					XLCDCommand(0x28)
#define XLCD1linemode()					XLCDCommand(0x20)